home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / geos-archive / GEOS-D64 / GeoThek Programme (19xx)(-)(de)[gt105a].d64 / convert.ml (.txt) < prev    next >
Commodore BASIC  |  2019-04-13  |  1KB  |  48 lines

  1. 5 NA$="APP-INFO"
  2. 10 IFPEEK(828)<>162THENLOAD"XFER.ML",8,1
  3. 15 PRINT"[147]REMOVING LOAD ADDRESS..."
  4. 20 OPEN2,8,2,"PRG.OBJ":GET#2,SA$,SB$
  5. 30 OPEN3,8,3,"PRG.LIT,P,W"
  6. 40 SYS828:CLOSE2:CLOSE3
  7. 45 PRINT"SCRATCHING OLD OBJECT CODE..."
  8. 50 OPEN15,8,15,"S0:PRG.OBJ":OPEN2,8,2,"#":S=1
  9. 55 REM CHANGE BYTE 34 & 35 IN 18,01 TO POINT TO 1ST SECTOR IN PRG.LIT
  10. 58 PRINT"SEARCHING FOR FILES...
  11. 60 [152]15,"U1:";2;0;18;S:[152]15,"B-P";2;0:[161]#2,A$,B$:[139]A$[178]""[167]NS[178]0:[137]70
  12. 65 NS[178][198](B$)
  13. 70 [129]I[178]5[164]224[169]32
  14. 80 [152]15,"B-P";2;I
  15. 90 N$[178]"":[129]J[178]1[164]8:[161]#2,A$:N$[178]N$[170]A$:[130]
  16. 95 [139]N$[178]NA$[167]IS[178]S:II[178]I[171]2:P1[178]1:[153]"  "NA$" FOUND...":[152]15,"S0:"NA$
  17. 98 [139]N$[178]NA$[167][139]P2[167]200
  18. 100 [139]N$[178]"PRG.LITCLOSE"[167][152]15,"B-P";2;I[171]3:[161]#2,A$:[139]A$[179][177]""[167]140
  19. 110 [130]I:[139]NS[178]0[167]200
  20. 120 S[178]NS:[137]60
  21. 140 [153]"  PRG.LIT FOUND...
  22. 145 P2=1:PRINT#15,"B-P";2;I-3:PRINT#2,CHR$(0);:GET#2,TT$,SS$
  23. 150 PRINT#15,"U2:";2;0;18;S
  24. 155 IFTT$=""THENTT$=CHR$(0)
  25. 160 IFSS$=""THENSS$=CHR$(0)
  26. 170 GOTO110
  27. 200 IFP1=0THENPRINT"[158]"NA$" NOT FOUND.":CLOSE2:CLOSE15:END
  28. 210 IFP2=0THENPRINT"[158]PRG.LIT NOT FOUND.":CLOSE2:CLOSE15:END
  29. 215 PRINT"ATTACHING PRG.LIT TO "NA$
  30. 220 PRINT#15,"U1:";2;0;18;IS:PRINT#15,"B-P";2;II-1:PRINT#2,CHR$(131);TT$;SS$;
  31. 225 PRINT#15,"U2:";2;0;18;IS
  32. 230 CLOSE2:CLOSE15:PRINT"CALCULATING START & END ADDRESSES"
  33. 240 IFSA$=""THENSA$=CHR$(0)
  34. 250 IFSB$=""THENSB$=CHR$(0)
  35. 260 SR=ASC(SB$)*256+ASC(SA$):ER=SR
  36. 270 OPEN2,8,2,"APP-INFO
  37. 280 [161]#2,A$:ER[178]ER[170]1:[139]ST[167]300
  38. 290 [137]280
  39. 300 [160]2:EB$[178][199]([181](ER[173]256)):EA$[178][199](ER[171][181](ER[173]256)[172]256)
  40. 310 [159]2,8,2,"#":[159]15,8,15
  41. 320 [152]15,"U1:";2;0;18;IS:[152]15,"B-P";2;II[170]18:[161]#2,TT$,SS$
  42. 330 [139]TT$[178]""[167]TT$[178][199](0)
  43. 340 [139]SS$[178]""[167]SS$[178][199](0)
  44. 350 [152]15,"U1:";2;0;[198](TT$);[198](SS$):[152]15,"B-P";2;71
  45. 360 [152]2,SA$;SB$;EA$;EB$;SA$;SB$
  46. 365 [152]15,"U2:";2;0;[198](TT$);[198](SS$)
  47. 370 [160]2:[160]15:[153]"DONE!"
  48.